home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Text / WASTE / WASTE 1.1.2 Distribution / Pseudo-UPI for THINK Pascal / GestaltEqu.p < prev    next >
Encoding:
Text File  |  1995-10-12  |  1.9 KB  |  79 lines  |  [TEXT/PJMM]

  1. unit GestaltEqu;
  2.  
  3. { Pascal Interface to the Macintosh Libraries }
  4.  
  5. { Copyright © Apple Computer Inc. }
  6. { All Rights Reserved }
  7.  
  8. { Adapted for use with THINK Pascal 4.0.x by Marco Piovanelli }
  9.  
  10. interface
  11.     uses
  12.         Types;
  13.  
  14.     type
  15.  
  16.         SelectorFunctionProcPtr = ProcPtr;  { FUNCTION SelectorFunction(selector: OSType; VAR response: LONGINT): OSErr; }
  17.         SelectorFunctionUPP = UniversalProcPtr;
  18.  
  19.     const
  20.  
  21.         uppSelectorFunctionProcInfo = $000003E0; { FUNCTION (4 byte param, 4 byte param): 2 byte result; }
  22.  
  23.     function NewSelectorFunctionProc (userRoutine: SelectorFunctionProcPtr): SelectorFunctionUPP;
  24.     inline
  25.         $2E9F;
  26.  
  27.     function CallSelectorFunctionProc (selector: OSType;
  28.                                     var response: LONGINT;
  29.                                     userRoutine: SelectorFunctionUPP): OSErr;
  30.     inline
  31.         $205F, $4E90;
  32.  
  33.     function Gestalt (selector: OSType;
  34.                                     var response: LONGINT): OSErr;
  35.     inline
  36.         $225F, $201F, $A1AD, $2288, $3E80;
  37.  
  38.     function NewGestalt (selector: OSType;
  39.                                     gestaltFunction: SelectorFunctionUPP): OSErr;
  40.     inline
  41.         $205F, $201F, $A3AD, $3E80;
  42.  
  43.     function ReplaceGestalt (selector: OSType;
  44.                                     gestaltFunction: SelectorFunctionUPP;
  45.                                     var oldGestaltFunction: SelectorFunctionUPP): OSErr;
  46.     inline
  47.         $225F, $205F, $201F, $2F09, $A5AD, $225F, $2288, $3E80;
  48.  
  49. { These functions are built into System 7.5, but not on earlier systems }
  50.  
  51.     function NewGestaltValue (selector: OSType;
  52.                                     newValue: LONGINT): OSErr;
  53. {$IFC NOT UNDEFINED SystemSevenFiveOrLater}
  54.     inline
  55.         $303C, $0401, $ABF1;
  56. {$ENDC}
  57.  
  58.     function ReplaceGestaltValue (selector: OSType;
  59.                                     replacementValue: LONGINT): OSErr;
  60. {$IFC NOT UNDEFINED SystemSevenFiveOrLater}
  61.     inline
  62.         $303C, $0402, $ABF1;
  63. {$ENDC}
  64.  
  65.     function DeleteGestaltValue (selector: OSType): OSErr;
  66. {$IFC NOT UNDEFINED SystemSevenFiveOrLater}
  67.     inline
  68.         $303C, $0203, $ABF1;
  69. {$ENDC}
  70.  
  71.     function SetGestaltValue (selector: OSType;
  72.                                     newValue: LONGINT): OSErr;
  73. {$IFC NOT UNDEFINED SystemSevenFiveOrLater}
  74.     inline
  75.         $303C, $0404, $ABF1;
  76. {$ENDC}
  77.  
  78. implementation
  79. end.